import { defineStore } from 'pinia'


// 第一个参数是应用程序中 store 的唯一 id
export const useUsersStore = defineStore("users", {
  state: () => {
    return {
      address:'',
      startLocationLongitude:'',
      startLocationLatitude:'',
      id:'',
      message: '', // 添加message状态
    }
  }, actions: {
    setMessage(payload) {
      this.message = payload;
    },
    // 添加setWebsocket方法
    setWebsocket(ws) {
      this.websocket = ws;
    }
  }
});
export const UserDataStore=defineStore("userData",{
  state:()=> {
    return{
      id:'',
      name:''
    };
  },
})